{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "60485aed",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "40dfd3aa",
   "metadata": {},
   "outputs": [],
   "source": [
    "jsonFile = 'hw.s3700_192.168.11.1mac.json'\n",
    "df = pd.read_json(jsonFile)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "04d86600",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mac</th>\n",
       "      <th>port</th>\n",
       "      <th>vlan</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>00e0-4c37-ace4</td>\n",
       "      <td>Eth0/0/11</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>e0d5-5ef7-0e13</td>\n",
       "      <td>Eth0/0/9</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>00e0-4cff-2c14</td>\n",
       "      <td>Eth0/0/11</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>c85b-7669-9e16</td>\n",
       "      <td>Eth0/0/9</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7427-eae8-fef9</td>\n",
       "      <td>Eth0/0/5</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>233</th>\n",
       "      <td>00e0-4c52-032d</td>\n",
       "      <td>Eth0/0/7</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>234</th>\n",
       "      <td>b42e-99e6-3279</td>\n",
       "      <td>Eth0/0/11</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>235</th>\n",
       "      <td>309c-237d-6c73</td>\n",
       "      <td>Eth0/0/11</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>236</th>\n",
       "      <td>accb-51de-42e4</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237</th>\n",
       "      <td>70b5-e874-5732</td>\n",
       "      <td>Eth0/0/5</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>238 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                mac       port  vlan\n",
       "0    00e0-4c37-ace4  Eth0/0/11    34\n",
       "1    e0d5-5ef7-0e13   Eth0/0/9    20\n",
       "2    00e0-4cff-2c14  Eth0/0/11    34\n",
       "3    c85b-7669-9e16   Eth0/0/9    20\n",
       "4    7427-eae8-fef9   Eth0/0/5    15\n",
       "..              ...        ...   ...\n",
       "233  00e0-4c52-032d   Eth0/0/7    17\n",
       "234  b42e-99e6-3279  Eth0/0/11    34\n",
       "235  309c-237d-6c73  Eth0/0/11    34\n",
       "236  accb-51de-42e4  Eth0/0/15    26\n",
       "237  70b5-e874-5732   Eth0/0/5    15\n",
       "\n",
       "[238 rows x 3 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_json(jsonFile)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "522775d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "34     133\n",
       "26      37\n",
       "20      22\n",
       "17      12\n",
       "15      10\n",
       "100      9\n",
       "88       6\n",
       "11       3\n",
       "87       3\n",
       "14       2\n",
       "200      1\n",
       "Name: vlan, dtype: int64"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['vlan'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "8224471c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Eth0/0/11    147\n",
       "Eth0/0/9      21\n",
       "Eth0/0/13     15\n",
       "Eth0/0/16     11\n",
       "Eth0/0/5      10\n",
       "Eth0/0/7      10\n",
       "Eth0/0/15     10\n",
       "Eth0/0/24      8\n",
       "Eth0/0/1       4\n",
       "Eth0/0/20      1\n",
       "GE0/0/3        1\n",
       "Name: port, dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['port'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "f840925b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Eth0/0/13    15\n",
       "Eth0/0/16    11\n",
       "Eth0/0/15    10\n",
       "Eth0/0/11     1\n",
       "Name: port, dtype: int64"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['vlan'] == 34 ]['port'].value_counts() #['port'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "1790927e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0      00e0-4c37-ace4\n",
       "2      00e0-4cff-2c14\n",
       "9      70b5-e874-5844\n",
       "10     b42e-9904-6dda\n",
       "11     f4b5-2024-f44c\n",
       "            ...      \n",
       "226    2428-fdc1-76d0\n",
       "227    f4b5-2024-ebaf\n",
       "232    b42e-99e6-329b\n",
       "234    b42e-99e6-3279\n",
       "235    309c-237d-6c73\n",
       "Name: mac, Length: 133, dtype: object"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vlan34 = df[df['vlan'] == 34 ]\n",
    "vlan34['mac']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "be315c20",
   "metadata": {},
   "outputs": [],
   "source": [
    "jsonFile = 'rg.nbs5552xg_192.168.11.200mac.json'\n",
    "rgdf = pd.read_json(jsonFile)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a611b507",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mac</th>\n",
       "      <th>port</th>\n",
       "      <th>type</th>\n",
       "      <th>vlan</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>210</th>\n",
       "      <td>0017-6111-1ad0</td>\n",
       "      <td>GigabitEthernet 0/23</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>211</th>\n",
       "      <td>0017-6112-279e</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>0017-6112-a93b</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>213</th>\n",
       "      <td>0017-6112-ab50</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>214</th>\n",
       "      <td>00d8-610c-3d58</td>\n",
       "      <td>GigabitEthernet 0/23</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>423</th>\n",
       "      <td>f4b5-2024-f19b</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>424</th>\n",
       "      <td>f4b5-2024-f365</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>425</th>\n",
       "      <td>f4b5-2024-f44c</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>426</th>\n",
       "      <td>f4b5-203b-1e44</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>429</th>\n",
       "      <td>fcaa-1422-a331</td>\n",
       "      <td>GigabitEthernet 0/22</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>133 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                mac                  port     type  vlan\n",
       "210  0017-6111-1ad0  GigabitEthernet 0/23  Dynamic    12\n",
       "211  0017-6112-279e  GigabitEthernet 0/22  Dynamic    12\n",
       "212  0017-6112-a93b  GigabitEthernet 0/22  Dynamic    12\n",
       "213  0017-6112-ab50  GigabitEthernet 0/22  Dynamic    12\n",
       "214  00d8-610c-3d58  GigabitEthernet 0/23  Dynamic    12\n",
       "..              ...                   ...      ...   ...\n",
       "423  f4b5-2024-f19b  GigabitEthernet 0/22  Dynamic    12\n",
       "424  f4b5-2024-f365  GigabitEthernet 0/22  Dynamic    12\n",
       "425  f4b5-2024-f44c  GigabitEthernet 0/22  Dynamic    12\n",
       "426  f4b5-203b-1e44  GigabitEthernet 0/22  Dynamic    12\n",
       "429  fcaa-1422-a331  GigabitEthernet 0/22  Dynamic    12\n",
       "\n",
       "[133 rows x 4 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vlan34mac = rgdf[(rgdf['mac'].isin(vlan34['mac']))  & (rgdf['vlan'] !=1 )]\n",
    "vlan34mac"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "c3413720",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GigabitEthernet 0/22    67\n",
       "GigabitEthernet 0/23    52\n",
       "GigabitEthernet 0/19    12\n",
       "GigabitEthernet 0/26     2\n",
       "Name: port, dtype: int64"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vlan34mac['port'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "69658b9c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>mac</th>\n",
       "      <th>port</th>\n",
       "      <th>type</th>\n",
       "      <th>vlan</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>307</th>\n",
       "      <td>4ced-fb41-fb44</td>\n",
       "      <td>GigabitEthernet 0/19</td>\n",
       "      <td>Dynamic</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                mac                  port     type  vlan\n",
       "307  4ced-fb41-fb44  GigabitEthernet 0/19  Dynamic    12"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vlan34mac[ vlan34mac['mac'].str.contains('-fb44')   ] "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "c28138b5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ip</th>\n",
       "      <th>mac</th>\n",
       "      <th>port</th>\n",
       "      <th>t</th>\n",
       "      <th>vlan</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>192.168.6.164</td>\n",
       "      <td>2428-fdc1-7699</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>192.168.6.9</td>\n",
       "      <td>4cf5-dc97-343e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>192.168.6.100</td>\n",
       "      <td>accb-51de-42e4</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>192.168.6.2</td>\n",
       "      <td>4cf5-dc97-344e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>192.168.6.11</td>\n",
       "      <td>4cf5-dc97-366e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>192.168.6.4</td>\n",
       "      <td>f000-003b-4931</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>192.168.6.7</td>\n",
       "      <td>f000-003f-669d</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>192.168.6.13</td>\n",
       "      <td>f000-006c-6648</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>192.168.6.14</td>\n",
       "      <td>f000-006c-6811</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>192.168.6.102</td>\n",
       "      <td>e0d5-5efc-0d5f</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               ip             mac       port    t  vlan\n",
       "67  192.168.6.164  2428-fdc1-7699  Eth0/0/15  D-0    26\n",
       "68    192.168.6.9  4cf5-dc97-343e  Eth0/0/15  D-0    26\n",
       "69  192.168.6.100  accb-51de-42e4  Eth0/0/15  D-0    26\n",
       "70    192.168.6.2  4cf5-dc97-344e  Eth0/0/15  D-0    26\n",
       "71   192.168.6.11  4cf5-dc97-366e  Eth0/0/15  D-0    26\n",
       "72    192.168.6.4  f000-003b-4931  Eth0/0/15  D-0    26\n",
       "73    192.168.6.7  f000-003f-669d  Eth0/0/15  D-0    26\n",
       "74   192.168.6.13  f000-006c-6648  Eth0/0/15  D-0    26\n",
       "76   192.168.6.14  f000-006c-6811  Eth0/0/15  D-0    26\n",
       "92  192.168.6.102  e0d5-5efc-0d5f  Eth0/0/15  D-0    26"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jsonFile = 'hw.s3700_192.168.11.1arp.json'\n",
    " \n",
    "arpdf = pd.read_json(jsonFile)\n",
    "\n",
    "arpdf[ arpdf['port'] == 'Eth0/0/15'] \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "88bb7ffc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ip</th>\n",
       "      <th>mac</th>\n",
       "      <th>port</th>\n",
       "      <th>t</th>\n",
       "      <th>vlan</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>192.168.6.1</td>\n",
       "      <td>80fb-06c9-6db9</td>\n",
       "      <td>Vlanif26</td>\n",
       "      <td>I -</td>\n",
       "      <td></td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>192.168.6.250</td>\n",
       "      <td>807c-6202-b8a1</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>192.168.6.247</td>\n",
       "      <td>4cbd-8f90-6d54</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>63</th>\n",
       "      <td>192.168.6.16</td>\n",
       "      <td>2428-fdc1-7333</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>64</th>\n",
       "      <td>192.168.6.3</td>\n",
       "      <td>1012-fb7a-2656</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>65</th>\n",
       "      <td>192.168.6.5</td>\n",
       "      <td>2428-fddc-be9d</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>66</th>\n",
       "      <td>192.168.6.59</td>\n",
       "      <td>2428-fdc1-7698</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>67</th>\n",
       "      <td>192.168.6.164</td>\n",
       "      <td>2428-fdc1-7699</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>68</th>\n",
       "      <td>192.168.6.9</td>\n",
       "      <td>4cf5-dc97-343e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>69</th>\n",
       "      <td>192.168.6.100</td>\n",
       "      <td>accb-51de-42e4</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>192.168.6.2</td>\n",
       "      <td>4cf5-dc97-344e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>192.168.6.11</td>\n",
       "      <td>4cf5-dc97-366e</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>192.168.6.4</td>\n",
       "      <td>f000-003b-4931</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>192.168.6.7</td>\n",
       "      <td>f000-003f-669d</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>192.168.6.13</td>\n",
       "      <td>f000-006c-6648</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75</th>\n",
       "      <td>192.168.6.155</td>\n",
       "      <td>fcaa-1470-f02e</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>192.168.6.14</td>\n",
       "      <td>f000-006c-6811</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>192.168.6.78</td>\n",
       "      <td>94d9-b36c-2a90</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>192.168.6.216</td>\n",
       "      <td>5cde-3414-a887</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>192.168.6.130</td>\n",
       "      <td>4cbd-8fcc-90b6</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>192.168.6.18</td>\n",
       "      <td>2428-fdc1-76c7</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>192.168.6.19</td>\n",
       "      <td>2428-fdc1-76cc</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>192.168.6.198</td>\n",
       "      <td>081f-7130-405c</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>192.168.6.215</td>\n",
       "      <td>6461-4046-fc4d</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>192.168.6.124</td>\n",
       "      <td>4cbd-8fd5-da71</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>192.168.6.31</td>\n",
       "      <td>f4b5-203b-2404</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>192.168.6.25</td>\n",
       "      <td>408d-5ce7-408c</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>192.168.6.65</td>\n",
       "      <td>40b0-765f-6e47</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>192.168.6.60</td>\n",
       "      <td>00e0-4c3c-a0db</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>192.168.6.21</td>\n",
       "      <td>b42e-9971-29cd</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>192.168.6.172</td>\n",
       "      <td>f4b5-203b-1eec</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>192.168.6.171</td>\n",
       "      <td>f4b5-2024-ef6b</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>192.168.6.102</td>\n",
       "      <td>e0d5-5efc-0d5f</td>\n",
       "      <td>Eth0/0/15</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>192.168.6.168</td>\n",
       "      <td>0017-6112-27a1</td>\n",
       "      <td>Eth0/0/13</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>192.168.6.45</td>\n",
       "      <td>0c9d-92cc-8c94</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>192.168.6.6</td>\n",
       "      <td>2428-fddc-bf7b</td>\n",
       "      <td>Eth0/0/11</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>192.168.6.169</td>\n",
       "      <td>70b5-e874-56e5</td>\n",
       "      <td>Eth0/0/16</td>\n",
       "      <td>D-0</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               ip             mac       port     t  vlan\n",
       "60    192.168.6.1  80fb-06c9-6db9   Vlanif26  I -       \n",
       "61  192.168.6.250  807c-6202-b8a1  Eth0/0/13   D-0    26\n",
       "62  192.168.6.247  4cbd-8f90-6d54  Eth0/0/13   D-0    26\n",
       "63   192.168.6.16  2428-fdc1-7333  Eth0/0/13   D-0    26\n",
       "64    192.168.6.3  1012-fb7a-2656  Eth0/0/13   D-0    26\n",
       "65    192.168.6.5  2428-fddc-be9d  Eth0/0/13   D-0    26\n",
       "66   192.168.6.59  2428-fdc1-7698  Eth0/0/13   D-0    26\n",
       "67  192.168.6.164  2428-fdc1-7699  Eth0/0/15   D-0    26\n",
       "68    192.168.6.9  4cf5-dc97-343e  Eth0/0/15   D-0    26\n",
       "69  192.168.6.100  accb-51de-42e4  Eth0/0/15   D-0    26\n",
       "70    192.168.6.2  4cf5-dc97-344e  Eth0/0/15   D-0    26\n",
       "71   192.168.6.11  4cf5-dc97-366e  Eth0/0/15   D-0    26\n",
       "72    192.168.6.4  f000-003b-4931  Eth0/0/15   D-0    26\n",
       "73    192.168.6.7  f000-003f-669d  Eth0/0/15   D-0    26\n",
       "74   192.168.6.13  f000-006c-6648  Eth0/0/15   D-0    26\n",
       "75  192.168.6.155  fcaa-1470-f02e  Eth0/0/16   D-0    26\n",
       "76   192.168.6.14  f000-006c-6811  Eth0/0/15   D-0    26\n",
       "77   192.168.6.78  94d9-b36c-2a90  Eth0/0/16   D-0    26\n",
       "78  192.168.6.216  5cde-3414-a887  Eth0/0/13   D-0    26\n",
       "79  192.168.6.130  4cbd-8fcc-90b6  Eth0/0/13   D-0    26\n",
       "80   192.168.6.18  2428-fdc1-76c7  Eth0/0/13   D-0    26\n",
       "81   192.168.6.19  2428-fdc1-76cc  Eth0/0/13   D-0    26\n",
       "82  192.168.6.198  081f-7130-405c  Eth0/0/13   D-0    26\n",
       "83  192.168.6.215  6461-4046-fc4d  Eth0/0/13   D-0    26\n",
       "84  192.168.6.124  4cbd-8fd5-da71  Eth0/0/13   D-0    26\n",
       "85   192.168.6.31  f4b5-203b-2404  Eth0/0/16   D-0    26\n",
       "86   192.168.6.25  408d-5ce7-408c  Eth0/0/16   D-0    26\n",
       "87   192.168.6.65  40b0-765f-6e47  Eth0/0/16   D-0    26\n",
       "88   192.168.6.60  00e0-4c3c-a0db  Eth0/0/16   D-0    26\n",
       "89   192.168.6.21  b42e-9971-29cd  Eth0/0/16   D-0    26\n",
       "90  192.168.6.172  f4b5-203b-1eec  Eth0/0/16   D-0    26\n",
       "91  192.168.6.171  f4b5-2024-ef6b  Eth0/0/16   D-0    26\n",
       "92  192.168.6.102  e0d5-5efc-0d5f  Eth0/0/15   D-0    26\n",
       "93  192.168.6.168  0017-6112-27a1  Eth0/0/13   D-0    26\n",
       "94   192.168.6.45  0c9d-92cc-8c94  Eth0/0/16   D-0    26\n",
       "95    192.168.6.6  2428-fddc-bf7b  Eth0/0/11   D-0    26\n",
       "96  192.168.6.169  70b5-e874-56e5  Eth0/0/16   D-0    26"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arpdf[ arpdf['ip'].str.contains('192.168.6.') ] \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "03404d0f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
